home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / exec / findport.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  1.3 KB  |  64 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: findport.c,v 1.4 1996/08/13 13:56:01 digulla Exp $
  4.     $Log: findport.c,v $
  5.     Revision 1.4  1996/08/13 13:56:01  digulla
  6.     Replaced __AROS_LA by __AROS_LHA
  7.     Replaced some __AROS_LH*I by __AROS_LH*
  8.     Sorted and added includes
  9.  
  10.     Revision 1.3  1996/08/01 17:41:10  digulla
  11.     Added standard header for all files
  12.  
  13.     Desc:
  14.     Lang: english
  15. */
  16. #include <exec/execbase.h>
  17. #include <aros/libcall.h>
  18.  
  19. /*****************************************************************************
  20.  
  21.     NAME */
  22.     #include <clib/exec_protos.h>
  23.  
  24.     __AROS_LH1(struct MsgPort *, FindPort,
  25.  
  26. /*  SYNOPSIS */
  27.     __AROS_LHA(STRPTR, name,A1),
  28.  
  29. /*  LOCATION */
  30.     struct ExecBase *, SysBase, 65, Exec)
  31.  
  32. /*  FUNCTION
  33.     Look for a public messageport by name. This function doesn't
  34.     arbitrate for the port list and must be protected with a Forbid()
  35.     Permit() pair.
  36.  
  37.     INPUTS
  38.     port - Pointer to NUL terminated C string.
  39.  
  40.     RESULT
  41.     Pointer to struct MsgPort or NULL if there is no port of that name.
  42.  
  43.     NOTES
  44.  
  45.     EXAMPLE
  46.  
  47.     BUGS
  48.  
  49.     SEE ALSO
  50.  
  51.     INTERNALS
  52.  
  53.     HISTORY
  54.  
  55. ******************************************************************************/
  56. {
  57.     __AROS_FUNC_INIT
  58.  
  59.     /* Nothing spectacular - just look for that name. */
  60.     return (struct MsgPort *)FindName(&SysBase->PortList,name);
  61.     __AROS_FUNC_EXIT
  62. } /* FindPort */
  63.  
  64.